package cn.iocoder.yudao.framework.common.exception.enums;

import cn.iocoder.yudao.framework.common.exception.BaseExceptionEnum;

public enum GlobalExceptionEnum implements BaseExceptionEnum {
    COMMON_ERROR("SYS.COMMON.ERROR", "未明确的通用异常"),

    IO_ERROR("SYS.IO.ERROR", "IO异常"),

    SYS_HTTP_RESPONSE_STATUE_ERROR("SYS.HTTP.RESPONSE.STATUE.ERROR", "HTTP请求结果状态码异常"),

    SYS_HTTP_ERROR("SYS.HTTP.ERROR","HTTP请求异常"),

    SYS_JSON_DATA_ERROR("SYS.JSON.DATA.ERROR","转换JSON异常"),

    SYS_DATE_FORMAT_ERROR("SYS.DATE.FORMAT.ERROR","日期转换异常"),

    SYS_DATABASE_ERROR("SYS.DATABASE.ERROR","数据库异常"),

    SYS_SHIRO_ERROR("SYS.SHIRO.ERROR","SHIRO异常"),

    BUS_PARAMETERS_CANNOT_BE_NULL("BUS.PARAMETERS.CANNOT.BE.NULL", "参数{}不能为空"),

    BUS_IS_PROCESSING("BUS.IS.PROCESSING","业务流程{}正在处理当中");

     public final String code;

     public final String desc;

    //public String i18n;

    GlobalExceptionEnum(String code, String des) {
        this.code = code;
        this.desc = des;
        //this.i18n = i18n;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }
}
